Optimal. Leaf size=65 \[ \frac {(2 a+b) \tanh ^{-1}\left (\frac {\sqrt {a} \tanh (x)}{\sqrt {a+b}}\right )}{2 a^{3/2} (a+b)^{3/2}}-\frac {b \sinh (x) \cosh (x)}{2 a (a+b) \left (a+b \cosh ^2(x)\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.06, antiderivative size = 65, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.400, Rules used = {3184, 12, 3181, 208} \[ \frac {(2 a+b) \tanh ^{-1}\left (\frac {\sqrt {a} \tanh (x)}{\sqrt {a+b}}\right )}{2 a^{3/2} (a+b)^{3/2}}-\frac {b \sinh (x) \cosh (x)}{2 a (a+b) \left (a+b \cosh ^2(x)\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 208
Rule 3181
Rule 3184
Rubi steps
\begin {align*} \int \frac {1}{\left (a+b \cosh ^2(x)\right )^2} \, dx &=-\frac {b \cosh (x) \sinh (x)}{2 a (a+b) \left (a+b \cosh ^2(x)\right )}-\frac {\int \frac {-2 a-b}{a+b \cosh ^2(x)} \, dx}{2 a (a+b)}\\ &=-\frac {b \cosh (x) \sinh (x)}{2 a (a+b) \left (a+b \cosh ^2(x)\right )}+\frac {(2 a+b) \int \frac {1}{a+b \cosh ^2(x)} \, dx}{2 a (a+b)}\\ &=-\frac {b \cosh (x) \sinh (x)}{2 a (a+b) \left (a+b \cosh ^2(x)\right )}+\frac {(2 a+b) \operatorname {Subst}\left (\int \frac {1}{a-(a+b) x^2} \, dx,x,\coth (x)\right )}{2 a (a+b)}\\ &=\frac {(2 a+b) \tanh ^{-1}\left (\frac {\sqrt {a} \tanh (x)}{\sqrt {a+b}}\right )}{2 a^{3/2} (a+b)^{3/2}}-\frac {b \cosh (x) \sinh (x)}{2 a (a+b) \left (a+b \cosh ^2(x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.23, size = 68, normalized size = 1.05 \[ \frac {(2 a+b) \tanh ^{-1}\left (\frac {\sqrt {a} \tanh (x)}{\sqrt {a+b}}\right )}{2 a^{3/2} (a+b)^{3/2}}-\frac {b \sinh (2 x)}{2 a (a+b) (2 a+b \cosh (2 x)+b)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.47, size = 1239, normalized size = 19.06 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.14, size = 104, normalized size = 1.60 \[ \frac {{\left (2 \, a + b\right )} \arctan \left (\frac {b e^{\left (2 \, x\right )} + 2 \, a + b}{2 \, \sqrt {-a^{2} - a b}}\right )}{2 \, {\left (a^{2} + a b\right )} \sqrt {-a^{2} - a b}} + \frac {2 \, a e^{\left (2 \, x\right )} + b e^{\left (2 \, x\right )} + b}{{\left (a^{2} + a b\right )} {\left (b e^{\left (4 \, x\right )} + 4 \, a e^{\left (2 \, x\right )} + 2 \, b e^{\left (2 \, x\right )} + b\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.11, size = 236, normalized size = 3.63 \[ -\frac {2 \left (\frac {b \left (\tanh ^{3}\left (\frac {x}{2}\right )\right )}{2 a \left (a +b \right )}+\frac {b \tanh \left (\frac {x}{2}\right )}{2 a \left (a +b \right )}\right )}{\left (\tanh ^{4}\left (\frac {x}{2}\right )\right ) a +b \left (\tanh ^{4}\left (\frac {x}{2}\right )\right )-2 a \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )+2 \left (\tanh ^{2}\left (\frac {x}{2}\right )\right ) b +a +b}-\frac {\ln \left (-\sqrt {a +b}\, \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )+2 \sqrt {a}\, \tanh \left (\frac {x}{2}\right )-\sqrt {a +b}\right )}{2 \left (a +b \right )^{\frac {3}{2}} \sqrt {a}}+\frac {\ln \left (\sqrt {a +b}\, \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )+2 \sqrt {a}\, \tanh \left (\frac {x}{2}\right )+\sqrt {a +b}\right )}{2 \left (a +b \right )^{\frac {3}{2}} \sqrt {a}}-\frac {b \ln \left (-\sqrt {a +b}\, \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )+2 \sqrt {a}\, \tanh \left (\frac {x}{2}\right )-\sqrt {a +b}\right )}{4 a^{\frac {3}{2}} \left (a +b \right )^{\frac {3}{2}}}+\frac {b \ln \left (\sqrt {a +b}\, \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )+2 \sqrt {a}\, \tanh \left (\frac {x}{2}\right )+\sqrt {a +b}\right )}{4 a^{\frac {3}{2}} \left (a +b \right )^{\frac {3}{2}}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.53, size = 134, normalized size = 2.06 \[ -\frac {{\left (2 \, a + b\right )} \log \left (\frac {b e^{\left (-2 \, x\right )} + 2 \, a + b - 2 \, \sqrt {{\left (a + b\right )} a}}{b e^{\left (-2 \, x\right )} + 2 \, a + b + 2 \, \sqrt {{\left (a + b\right )} a}}\right )}{4 \, \sqrt {{\left (a + b\right )} a} {\left (a^{2} + a b\right )}} - \frac {{\left (2 \, a + b\right )} e^{\left (-2 \, x\right )} + b}{a^{2} b + a b^{2} + 2 \, {\left (2 \, a^{3} + 3 \, a^{2} b + a b^{2}\right )} e^{\left (-2 \, x\right )} + {\left (a^{2} b + a b^{2}\right )} e^{\left (-4 \, x\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.02 \[ \int \frac {1}{{\left (b\,{\mathrm {cosh}\relax (x)}^2+a\right )}^2} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________